<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>上岗必修课</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="../../css/simple-line-icons.css">
		<link rel="stylesheet" href="../../css/mui.min.css">
		<link rel="stylesheet" href="../../css/mui-ext.css">
		<style>
			html,
			body {
				background-color: #efeff4;
			}
		</style>
	</head>

	<body>
		<!--<header class="mui-bar mui-bar-nav bg-default">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left bg-default" style="padding-top: 6px;padding-bottom: 0px;"></a>
			<h1 class="mui-title">家长上岗测试 </h1>
		</header>-->
		<div class="mui-content">
			<ul id="postsMustDat" class="mui-table-view mui-table-view-chevron">
				<!--<li class="mui-table-view-cell mui-media">
					<a style="display: flex;">
						<img src="../../img/jzkt/cbd.jpg" style="height: 110px; width: 110px;">
						<div class="mui-media-body">
							<span style="font-size: 15px;">&nbsp;&nbsp;第四章：唤醒技术--4会家长</span><br /><br />
							<p style="font-size: 13px;" class='mui-ellipsis'>&nbsp;&nbsp;简介：5会家长，会关注，会。。。</p><br />
							<p style="font-size: 13px;" class='mui-ellipsis'>&nbsp;&nbsp;集数：5集</p>
						</div>
					</a>
				</li>-->
			</ul>
		</div>

	</body>

	<script src="../../js/mui.min.js"></script>
	<script src="../../js/utils/http.utils.js"></script>
	<script>
		window.onload = function(){
			fun_loadPostsMustVideoData(8, 0);
		}
		
		function fun_loadPostsMustVideoData($psize, $cpage){
			mui.ajax({
				url : $request_url.getPostsVideosLst,
				type : "get",
				dataType : "json",
				headers: {
					"Authorization": $headers_authorization
				},
				data : {
					typeCode : "SGBX"
				},
				success : function(dat){
					if(dat.code == 0){
						var $mustVideoArray = dat.result;
						var $mvidDocHtml = document.getElementById("postsMustDat");
						if($mustVideoArray != null && $mustVideoArray.length > 0){
							for(var i = 0; i < $mustVideoArray.length; i ++){
								var $mvideo = $mustVideoArray[i];
								var div =document.createElement('li');
								div.innerHTML = fun_getPostsMustVideoTem($mvideo, i);
								$mvidDocHtml.appendChild(div);
							}
						} else {
							mui.toast("没有更多数据啦...");
						}
					} else {
						mui.toast(dat.message);
					}
				}, error : function(err){
					mui.toast("服务繁忙");
				}
			});
		}
			
		function fun_getPostsMustVideoTem($video, $i){
			var $posVidTemHtml = 
				'<li class="mui-table-view-cell mui-media">'
			+			'<a href="course-video.html?vidcode='+ $video.code +'&vidtit='+ $video.title +'" style="display: flex;">'
			+				'<img src="'+ $video.imagePath +'" style="height: 110px; width: 110px;" height="110" width="110">'
			+				'<div class="mui-media-body">'
			+					'<span style="font-size: 17px;">&nbsp;&nbsp;'+ $video.title +'</span><br /><br />'
			+					'<p style="font-size: 14px;" class="mui-ellipsis">&nbsp;&nbsp;'+ $video.description +'</p><br />'
			+					'<p style="font-size: 14px;" class="mui-ellipsis">&nbsp;&nbsp;集数：'+ $video.resourceNum +'集</p>'
			+				'</div>'
			+			'</a>'
			+		'</li><br/>';
			return $posVidTemHtml;
		}
	</script>

</html>